[client]
# DO NOT CHANGE
port                           = 3306

[mysqld]
# DO NOT CHANGE
server_id                      = server_id_num
basedir                        = /opt/mysql/base
datadir                        = /opt/mysql/data/3306
log_bin                        = /opt/mysql/binlog/3306/mysql-bin
tmpdir                         = /opt/mysql/tmp/3306
socket                         = /opt/mysql/data/3306/mysqld.sock
port                           = 3306
binlog_format                  = ROW
relay-log                      = mysql-relay-bin
log-slave-updates              = 1
skip_slave_start               = 1
skip-name-resolve              = 1
max_allowed_packet             = 32M
read_only                      = 0

default_storage_engine         = InnoDB
character_set_server           = utf8

skip-external-locking          = 1

innodb_strict_mode             = 1
innodb_buffer_pool_size        = innodb_buffer_var
innodb_stats_on_metadata       = 0
innodb_file_format             = Barracuda
innodb_flush_method            = O_DIRECT
innodb_log_files_in_group      = 2
innodb_log_file_size           = 256M
innodb_log_buffer_size         = 64M
innodb_file_per_table          = 1
innodb_max_dirty_pages_pct     = 60
innodb_io_capacity             = 200
innodb_data_file_path          = ibdata1:1G:autoextend

# CACHES AND LIMITS #
key_buffer_size                = 32M
tmp_table_size                 = 32M
max_heap_table_size            = 32M
table_open_cache               = 1024
query_cache_type               = 0
query_cache_size               = 0
max_connections                = 1000
thread_cache_size              = 1024
open_files_limit               = 65535

# LOGGING #
# DO NOT CHANGE
log_error                      = mysql-error.log
slow_query_log                 = 1
slow_query_log_file            = mysql-slow.log
log_slow_admin_statements = 1
log_slow_slave_statements = 1
long_query_time  = 1


# SEMISYNC #
plugin-load                    = "rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so"
rpl-semi-sync-master-enabled   = 1
rpl-semi-sync-slave-enabled    = 1
# SEMISYNC END #

# ATTENTION #
replicate-ignore-table         = mysql.ibbackup_binlog_marker
slave-skip-errors              = ddl_exist_errors
sync_binlog                    = 1
max_binlog_size                = 250M

relay-log-info-repository      = TABLE
relay_log_recovery             = 1
master_info_repository         = TABLE

# GTID #
gtid-mode                      = ON
enforce-gtid-consistency       = 1
# GTID END #

